package one.stand.feign;

import one.stand.fallback.UserFallBack;
import one.stand.model.ResultModel;
import one.stand.request.*;
import one.stand.request.coupon.CouponQuery;
import one.stand.request.coupon.GoodsCouponQuery;
import one.stand.request.live.LiveRequest;
import one.stand.response.*;
import one.stand.response.live.LiveResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Component
@FeignClient(value = "user-service", fallback = UserFallBack.class, decode404 = true)
public interface UserFegin {

    /**
     * 查看名片
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/seeDetail")
    ResultModel<List<BusinessCardResponse>> seeDetail(@RequestBody BusinessCardRequest request);

    /**
     * 获取默认名片
     *
     * @param request 请求
     * @return 名片列表
     */
    @PostMapping("businessCard/defaultBusinessCards")
    ResultModel<List<BusinessCardResponse>> findDefaultBusinessCards(BusinessCardRequest request);

    /**
     * 创建名片
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/createCard")
    ResultModel<Boolean> createCard(@RequestBody BusinessCardRequest request);

    /**
     * 修改名片
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/updateCard")
    ResultModel<Boolean> updateCard(@RequestBody BusinessCardRequest request);

    /**
     * 名片详情
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/cardDetails")
    ResultModel<BusinessCardResponse> cardDetails(@RequestBody BusinessCardRequest request);

    /**
     * 名片详情-不登录查看
     *
     * @param request 请求
     * @return 名片详情
     */
    @PostMapping("businessCard/findBusinessCardDetail")
    ResultModel<BusinessCardResponse> findBusinessCardDetail(BusinessCardRequest request);

    /**
     * 修改名片
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/isTop")
    ResultModel isTop(@RequestBody SeeRecordRequest request);

    /**
     * 添加收藏
     */
    @PostMapping("/personal/addCollection")
    ResultModel addCollection(@RequestBody CollectionRequest collectionRequest);

    /**
     * 判断是否已经收藏
     */
    @PostMapping("/personal/getIsCollection")
    ResultModel<Integer> getIsCollection(@RequestBody CollectionRequest request);

    /**
     * 取消收藏
     */
    @PostMapping("/personal/delCollection")
    ResultModel delCollection(@RequestBody CollectionRequest collectionRequest);

    /**
     * 查询收藏
     */
    @PostMapping("/personal/getCollection")
    ResultModel getCollection(@RequestBody CollectionRequest request);

    /**
     * 添加我的地址
     */
    @PostMapping("/personal/addAddress")
    ResultModel addAddress(@RequestBody AddressRequest addressRequest);

    /**
     * 修改我的地址
     */
    @PostMapping("/personal/updAddress")
    ResultModel updAddress(@RequestBody AddressRequest addressRequest);

    /**
     * 删除我的地址
     */
    @PostMapping("/personal/delAddress")
    ResultModel delAddress(@RequestBody AddressRequest addressRequest);

    /**
     * 我的地址设置为默认值
     */
    @PostMapping("/personal/isdefult")
    ResultModel isdefult(@RequestBody AddressRequest addressRequest);

    /**
     * 查询公司信息
     */
    @PostMapping("/personal/getCompanyAllInfo")
    ResultModel getCompanyAllInfo(@RequestBody CompanyRequest companyRequest);

    /**
     * 查询公司动态
     */
    @PostMapping("/personal/getDynamicInfo")
    ResultModel<List<DynamicResponse>> getDynamicInfo(@RequestBody DynamicRequest dynamicRequest);

    /**
     * 给动态/文章点赞
     */
    @PostMapping("/personal/doDynamicThumbs")
    ResultModel doDynamicThumbs(@RequestBody DynamicRequest dynamicRequest);

    /**
     * 查询公司官网
     */
    @PostMapping("/personal/getWebsiteInfo")
    ResultModel getWebsiteInfo(@RequestBody WebsiteRequest websiteRequest);

    /**
     * 查询用户评论/回复
     */
    @PostMapping("/personal/selectComment")
    ResultModel selectComment(@RequestBody CommentRequest request);

    /**
     * 用户评论/回复
     */
    @PostMapping("/personal/doComment")
    ResultModel doComment(@RequestBody CommentRequest request);

    /**
     * 用户删除评论
     */
    @PostMapping("/personal/delComment")
    ResultModel delComment(@RequestBody CommentRequest request);

    /**
     * 查询公司招聘信息
     */
    @PostMapping("/personal/getCompanyRecruit")
    ResultModel<List<CompanyRecruitResponse>> getCompanyRecruit(@RequestBody CompanyRecruitRequest request);

    /**
     * 用户提交需求信息
     */
    @PostMapping("/personal/addDemand")
    ResultModel addDemand(@RequestBody DemandRequest request);

    /**
     * 保存用户formid信息
     */
    @PostMapping("/personal/addFormId")
    ResultModel<Integer> addFormId(@RequestBody UserRequest request);

    /**
     * 查询用户常用语（3.2版本迭代）
     *
     * @param request
     * @return
     */
    @PostMapping("/personal/selectUserCommonList")
    ResultModel<List<UserCommonResponse>> selectUserCommonList(@RequestBody UserCommonRequest request);

    /**
     * 新增/修改用户常用语（3.2版本迭代）
     *
     * @param request
     * @return
     */
    @PostMapping("/personal/insertUserCommonList")
    ResultModel<Boolean> insertUserCommonList(@RequestBody UserCommonRequest request);

    /**
     * 删除用户常用语（3.2版本迭代）
     *
     * @param request
     * @return
     */
    @PostMapping("/personal/delUserCommonList")
    ResultModel<Boolean> delUserCommonList(@RequestBody UserCommonRequest request);

    /**
     * 上下移动用户常用语（3.2版本迭代）
     *
     * @param request
     * @return
     */
    @PostMapping("/personal/moveUserCommon")
    ResultModel<Boolean> moveUserCommon(@RequestBody UserCommonRequest request);

    /**
     * 申请成为分销员（3.2版本迭代）
     *
     * @param request
     * @return
     */
    @PostMapping("/distribution/insertUserLevel")
    ResultModel<String> insertUserLevel(@RequestBody UserLevelRequest request);

    /**
     * 分销员中心（3.2版本迭代）
     *
     * @param request
     * @return
     */
    @PostMapping("/distribution/getUserLevelInfo")
    ResultModel<Map<String, Object>> getUserLevelInfo(@RequestBody UserLevelRequest request);

    /**
     * 生成邀请卡
     *
     * @param request
     * @return
     */
    @PostMapping("/distribution/saveInvitationCard")
    ResultModel<Map<String, Object>> saveInvitationCard(@RequestBody UserLevelRequest request);

    /**
     * 邀请存为分销员(扫码进入)
     *
     * @param request
     * @return
     */
    @PostMapping("/distribution/saveDistributor")
    ResultModel<Boolean> saveDistributor(@RequestBody UserLevelRequest request);

    /**
     * 我的邀请列表
     *
     * @param request
     * @return
     */
    @PostMapping("/distribution/myInvitationList")
    ResultModel<Map<String, Object>> myInvitationList(@RequestBody UserLevelRequest request);

    /**
     * 推广商家列表
     *
     * @param request
     * @return
     */
    @PostMapping("/distribution/applyBusinessList")
    ResultModel<Map<String, Object>> applyBusinessList(@RequestBody UserLevelRequest request);

    /**
     * 推广订单列表
     *
     * @param request
     * @return
     */
    @PostMapping("/distribution/distributorOrderList")
    ResultModel<List<UserLevelResponse>> distributorOrderList(@RequestBody UserLevelRequest request);

    /**
     * 查询我的地址
     */
    @PostMapping("/personal/getAddress")
    ResultModel getAddress(@RequestBody TokenRequest tokenRequest);

    /**
     * 查询公司信息
     */
    @PostMapping("/goods/getCompanyInfo")
    ResultModel getCompanyInfo(@RequestBody CompanyRequest companyRequest);

    /**
     * 根据公司查询产品分类
     */
    @PostMapping("/goods/getGoodsType")
    ResultModel getGoodsType(@RequestBody GoodstypeRequest goodstypeRequest);

    /**
     * 根据产品分类查询产品
     */
    @PostMapping("/goods/getGoodsList")
    ResultModel getGoodsList(@RequestBody GoodsRequest goodsRequest);

    /**
     * 根据产品查询规格
     */
    @PostMapping("/goods/getGoodSpec")
    ResultModel getGoodSpec(@RequestBody GoodSpecRequest goodSpecRequest);

    /**
     * 根据产品详情
     */
    @PostMapping("/goods/getGoodsInfo")
    ResultModel getGoodsInfo(@RequestBody GoodsRequest goodsRequest);

    /**
     * 查询我的购物车
     */
    @PostMapping("/orders/selectShopcart")
    ResultModel selectShopcart(@RequestBody ShopcartRequest shopcartRequest);

    /**
     * 保存商品到购物车
     */
    @PostMapping("/orders/addShopcart")
    ResultModel addShopcart(@RequestBody ShopcartRequest shopcartRequest);

    /**
     * 删除购物车商品
     */
    @PostMapping("/orders/delShopcart")
    ResultModel delShopcart(@RequestBody ShopcartRequest shopcartRequest);

    /**
     * 修改购物车商品数量
     */
    @PostMapping("/orders/updShopcartNum")
    ResultModel updShopcartNum(@RequestBody ShopcartRequest shopcartRequest);

    /**
     * 商品直接下单
     */
    @PostMapping("/orders/directOrder")
    ResultModel directOrder(@RequestBody OrderinfoRequest orderinfoRequest);

    /**
     * 查询用户订单信息
     */
    @PostMapping("/orders/getOrderList")
    ResultModel<List<OrdersResponse>> getOrderList(@RequestBody OrdersRequest request);

    /**
     * 查询用户订单数量
     */
    @PostMapping("/orders/getOrderListCount")
    ResultModel<List<Map<String, Object>>> getOrderListCount(@RequestBody OrdersRequest request);

    /**
     * 下单 - old
     */
    @PostMapping("/orders/goPay")
    ResultModel<Map<String, String>> goPay(@RequestBody OrdersRequest request);

    /**
     * 下单 - new
     */
    @PostMapping("/orders/goPayNew")
    ResultModel<Map<String, String>> goPayNew(@RequestBody OrdersRequest request);

    /**
     * 去支付（下单未支付后再次支付）
     */
    @PostMapping("/orders/goTwoPay")
    ResultModel<Map<String, String>> goTwoPay(@RequestBody OrdersRequest request);

    /**
     * 订单支付
     */
    @PostMapping("/orders/paymentOrders")
    String paymentOrders(@RequestParam(value = "request") String request);

    /**
     * 用户提交退款申请
     */
    @PostMapping("/orders/refundOrder")
    ResultModel refundOrder(@RequestBody OrdersRequest request);

    /**
     * 用户撤销退款申请
     */
    @PostMapping("/orders/backRefundState")
    ResultModel backRefundState(@RequestBody OrdersRequest request);

    /**
     * 购物车下单
     */
    @PostMapping("/orders/shopcartOrder")
    ResultModel<String> shopcartOrder(@RequestBody ShopcartRequest shopcartRequest);

    /**
     * 购物车添加收藏
     */
    @PostMapping("/orders/shopAddCollection")
    ResultModel shopAddCollection(@RequestBody CollectionRequest collectionRequest);

    /**
     * 下单时订单详情
     */
    @PostMapping("/orders/getOrderInfo")
    ResultModel<List<OrdersResponse>> getOrderInfo(@RequestBody OrdersRequest request);

    /**
     * 待付款时订单详情
     */
    @PostMapping("/orders/getPayOrderInfo")
    ResultModel<List<OrdersResponse>> getPayOrderInfo(@RequestBody OrdersRequest request);

    /**
     * 修改订单状态
     */
    @PostMapping("/orders/updateOrderState")
    ResultModel updateOrderState(@RequestBody OrdersRequest request);

    /**
     * 修改订单状态
     */
    @PostMapping("/orders/doReminder")
    ResultModel doReminder(@RequestBody OrdersRequest request);

    /**
     * 再来一单
     */
    @PostMapping("/orders/anotherOrder")
    ResultModel anotherOrder(@RequestBody OrdersRequest request);

    /**
     * 开团/参团
     */
    @PostMapping("/orders/openOrJoinAssemble")
    ResultModel<Integer> openOrJoinAssemble(@RequestBody AssembleRequest request);

    /**
     * 查询用户自己的名片
     */
    @PostMapping("/businessCard/getUserCard")
    ResultModel getUserCard(@RequestBody BusinessCardRequest request);

    /**
     * 删除浏览记录
     */
    @PostMapping("/businessCard/delSeeCard")
    ResultModel delSeeCard(@RequestBody SeeRecordRequest request);

    /**
     * 点赞操作
     */
    @PostMapping("/businessCard/doThumbs")
    ResultModel doThumbs(@RequestBody SeeRecordRequest request);

    /**
     * 得到名片二维码
     */
    @PostMapping("/businessCard/getWxTwoCode")
    ResultModel getWxTwoCode(@RequestBody BusinessCardRequest request);

    /**
     * 添加通话记录
     */
    @PostMapping("/businessCard/addCallsRecord")
    ResultModel addCallsRecord(@RequestBody CallsPhoneRecordRequest request);

    /**
     * 得到太阳码参数
     */
    @PostMapping("/businessCard/getSunCode")
    ResultModel<SunCodeResponse> getSunCode(@RequestBody SunCodeRequest request);

    /**
     * 添加官网申请信息表单
     */
    @PostMapping("/official/saveOfficialApply")
    ResultModel saveOfficialApply(@RequestBody OfficialApplyRequest request);

    /**
     * 添加官网联系我们信息表单
     */
    @PostMapping("/official/saveOfficialContact")
    ResultModel saveOfficialContact(@RequestBody OfficialContactRequest request);

    /**
     * 添加官网表单信息
     */
    @PostMapping("/official/saveOfficialFrom")
    ResultModel saveOfficialFrom(@RequestBody OfficialFromRequest request);

    /**
     * 添加咨询记录
     *
     * @return
     */
    @PostMapping("/record/addConsultRecord")
    ResultModel<Boolean> addConsultRecord(@RequestBody ConsultRecordRequest request);

    /**
     * 添加商品转发记录
     *
     * @return
     */
    @PostMapping("/record/addGoodsForwardRecord")
    ResultModel<Integer> addGoodsForwardRecord(@RequestBody GoodsForwardRecordRequest request);

    /**
     * 添加商品转发记录
     *
     * @return
     */
    @PostMapping("/record/validGoodsForwardRecord")
    ResultModel<Boolean> validGoodsForwardRecord(@RequestBody GoodsForwardRecordRequest request);

    /**
     * 添加文章转发记录
     *
     * @return
     */
    @PostMapping("/record/addDynamicForwardRecord")
    ResultModel<Boolean> addDynamicForwardRecord(@RequestBody DynamicForwardRecordRequest request);

    /**
     * 添加拨打电话记录
     *
     * @return
     */
    @PostMapping("/record/addCallsPhoneRecord")
    ResultModel<Boolean> addCallsPhoneRecord(@RequestBody CallsPhoneRecordRequest request);

    /**
     * 佣金/提现列表
     *
     * @return
     */
    @PostMapping("/personal/selectRoyaltyRecord")
    ResultModel<Map<String, Object>> selectRoyaltyRecord(@RequestBody RoyaltyRecordRequest request);

    /**
     * 查询企业配置图片
     *
     * @return
     */
    @PostMapping("/record/selectCompanyPhoto")
    ResultModel<List<CompanyPhotoResponse>> selectCompanyPhoto(@RequestBody CompanyPhotoRequest request);

    /**
     * 提现操作
     *
     * @return
     */
    @PostMapping("/personal/doCash")
    ResultModel<Boolean> doCash(@RequestBody RoyaltyRecordRequest request);

    /**
     * 得到名片海报
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCardPoster")
    ResultModel getCardPoster(@RequestBody BusinessCardRequest request);

    @PostMapping("goods/goodsCard")
    ResultModel goodsCard(@RequestBody GoodSpecRequest request);

    /**
     * 根据公司ID查询预约管理中预约列表数和产品管理数
     */
    @PostMapping("products/getProductsCount")
    ResultModel<Map<String, Object>> getProductsCount(@RequestBody AppointmentRequest request);

    /**
     * 查询公司预约商品类型（下拉框显示）
     */
    @PostMapping("products/selectProductsTypeList")
    ResultModel<List<ProductsTypeResponse>> selectProductsTypeList(@RequestBody ProductsTypeRequest request);

    /**
     * 分页查询公司预约商品类型
     */
    @PostMapping("products/selectProductsTypePage")
    ResultModel<Map<String, Object>> selectProductsTypePage(@RequestBody ProductsTypeRequest request);

    /**
     * 查询公司预约商品类型（包含类型下的商品信息）
     */
    @PostMapping("products/selectProductsType")
    ResultModel<List<ProductsTypeResponse>> selectProductsType(@RequestBody ProductsTypeRequest request);

    /**
     * 分页查询公司预约商品信息
     */
    @PostMapping("products/selectProductsPage")
    ResultModel<Map<String, Object>> selectProductsPage(@RequestBody ProductsRequest request);

    /**
     * 查询公司预约商品信息
     */
    @PostMapping("products/getProductsInfo")
    ResultModel<ProductsResponse> getProductsInfo(@RequestBody ProductsRequest request);

    /**
     * 分页查询预约列表
     */
    @PostMapping("products/selectAppointmentPage")
    ResultModel<Map<String, Object>> selectAppointmentPage(@RequestBody AppointmentRequest request);

    /**
     * 查询预约列表详情
     */
    @PostMapping("products/getAppointmentInfo")
    ResultModel<AppointmentResponse> getAppointmentInfo(@RequestBody AppointmentRequest request);

    /**
     * 新增预约订单
     */
    @PostMapping("products/insertAppointment")
    ResultModel<Boolean> insertAppointment(@RequestBody AppointmentRequest request);

    /**
     * 修改预约订单状态
     */
    @PostMapping("products/updAppointmentState")
    ResultModel<Boolean> updAppointmentState(@RequestBody AppointmentRequest request);

    /**
     * 添加名片视频
     *
     * @param request
     * @return
     */
    @PostMapping("businessCardVideo/addVideo")
    ResultModel<Boolean> addVideo(@RequestBody BusinessCardVideoRequest request);

    /**
     * 修改名片视频
     *
     * @param request
     * @return
     */
    @PostMapping("businessCardVideo/uodVideo")
    ResultModel<Boolean> uodVideo(@RequestBody BusinessCardVideoRequest request);

    /**
     * 移动名片视频
     *
     * @param request
     * @return
     */
    @PostMapping("businessCardVideo/moveVideo")
    ResultModel<Boolean> moveVideo(@RequestBody BusinessCardVideoRequest request);

    /**
     * 删除视频
     *
     * @param request
     * @return
     */
    @PostMapping("businessCardVideo/delVideo")
    ResultModel<Boolean> delVideo(@RequestBody BusinessCardVideoRequest request);

    /**
     * 删除视频
     *
     * @param request
     * @return
     */
    @PostMapping("businessCardVideo/moveList")
    ResultModel<List<BusinessCardVideoResponse>> moveList(@RequestBody BusinessCardVideoRequest request);

    /**
     * 领取优惠券
     *
     * @param request
     * @return
     */
    @PostMapping("user/coupon/receive")
    ResultModel<Boolean> receive(@RequestBody CouponRequest request);

    /**
     * 用户自己的优惠券列表
     *
     * @param request
     * @return
     */
    @PostMapping("user/coupon/myList")
    ResultModel myList(@RequestBody UserCouponRequest request);

    @PostMapping("user/coupon/noReceive")
    ResultModel<List<CompanyCouponResponse>> noReceive(@RequestBody CouponRequest request);

    /**
     * 获取企业优惠券
     *
     * @param request
     * @return
     */
    @PostMapping("company/coupon/getCompanyCouponList")
    ResultModel<List<CompanyCouponResponse>> getCompanyCouponList(@RequestBody CouponQuery request);

    /**
     * 获取企业模块配置信息
     */
    @PostMapping("company/companyModuleConfig/findCompanyModuleConfigs")
    ResultModel<List<CompanyModuleConfigResponse>> findCompanyModuleConfigs(CompanyModuleConfigRequest request);

    /**
     * 查询公司订阅消息模板
     * @param request
     * @return
     */
    @PostMapping("subscription/getComanySub")
    ResultModel<List<SubscriptionNewResponse>> getComanySub(@RequestBody SubRequest request);

    /**
     * 发放优惠券
     * @param requestGrant
     */
    @PostMapping("user/coupon/grantCoupon")
    ResultModel grantCoupon(@RequestBody GrantCouponRequest requestGrant);


    /**
     * 领取优惠券
     * @param couponRequest
     * @return
     */
    @PostMapping("user/coupon/receiveCoupon")
    ResultModel<Boolean> receiveCoupon(@RequestBody CouponRequest couponRequest);

    @PostMapping("live/queryLiveList")
    ResultModel<LiveResponse> queryLiveList(@RequestBody LiveRequest request);

    @PostMapping("user/coupon/selectUserCouponNotUsed")
    ResultModel<List<UserCouponResponse>> selectUserCouponNotUsed(GoodsCouponQuery goodsCouponQuery);

    @PostMapping("video/switchVideo")
    ResultModel switchVideo(SwitchVideoRequest request);
}
